@import '@/styles/utils.scss';

.header {
  display: flex;
  justify-content: space-between;
  height: 80px;
  border-radius: 16px 16px 0px 0px;
  align-items: center;
  padding: 0 0px;
  border-bottom: 1px solid #F1F1F1;

  :global(.dark) & {
    border-bottom: 1px solid #4C4D50;
  }

  .hl {

    padding-left: 24px;
  }

  .hc1 {
    flex: 1;
    display: flex;

    padding-left: 28px;
    padding-right: 10px;
  }

  .hc2 {
    flex: 1;
    display: flex;
    justify-content: center;
    padding-left: 10px;
    padding-right: 10px;
    align-items: center;
  }

  .hr {
    display: flex;
    justify-content: flex-end;
    padding-right: 24px;
  }
}


.switch {
  height: 32px;
  background: #EAEDF0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 3px;
  position: relative;
  cursor: pointer;

  :global(.dark) & {
    background: #1F2023;
  }

  .switchItem {
    width: 43px;
    height: 26px;
    border-radius: 6px;
  }

}

.slider {
  position: absolute;
  width: 43px;
  height: 26px;
  background: #fff;
  border-radius: 6px;
  transition: all 0.3s;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  color: #000;
  line-height: 1;
  border-radius: 6px;

  &.right {
    transform: translateX(43px);
  }

  &.active {
    background: #000;
    color: #fff;
  }

  :global(.dark) & {
    background: #3F3F46;
    color: #fff;
    box-shadow: none;

    &.active {
      background: #fff;
      color: #000;
    }
  }
}

.url {
  width: 100%;
  max-width: 648px;
  height: 32px;
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid #E0E0E0;
  color: #6B6B6B;
  display: flex;
  align-items: center;
  padding: 0 10px;
  justify-content: space-between;

  :global(.dark) & {
    background: #1F2023;
    border-color: #3F3F46;
    color: #A1A1AA;
  }

  button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #71717A;
    padding: 4px;
    transition: color 0.2s;
    line-height: 1;
    i{
      font-size: 14px;
    }

    &:hover {
      color: #18181B;
    }

    :global(.dark) & {
      color: #A1A1AA;

      &:hover {
        color: #FFFFFF;
      }
    }

    svg {
      width: 14px;
      height: 14px;
    }
  }

  .url-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    margin: 0 8px;
  }
}


.button1 {
  all: unset;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #FFFFFF;
  padding: 0px 10px;
  min-width: 124px;
  height: 32px;
  line-height: 1;
  border-radius: 8px;
  border: 1px solid #E3E3E3;
  font-size: 12px;
  color: #353535;

  &:disabled {
    cursor: not-allowed;
    opacity: 0.5;
  }

  &:hover {
    background: #F3F3F3;
  }


  :global(.dark) & {
    color: #d1d5db;
    border-color: #3F4245;
    background-color: transparent;

    &:hover {
      background: #313234;
    }
  }
}

.urlButtons {
  display: flex;
  gap: 4px;
  margin-left: 12px;
}

.iconButton {
  all: unset;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 32px;
  height: 32px;
  border-radius: 100%;
  color: #000000;
  border: 1px solid transparent;
  line-height: 1;

  &:disabled {
    cursor: not-allowed;
    opacity: 0.5;
  }

  &:hover {
    background: #F3F3F3;
    color: #18181B;
  }

  i {
    font-size: 16px;
  }

  :global(.dark) & {
    color: #d1d5db;
    background-color: transparent;

    &:hover {
      background-color: #313234;
    }
  }


}


.settingsButton {
  // all: unset;
  width: 32px;
  height: 32px;
  cursor: pointer;
  padding: 8px;
  border-radius: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  transition: all 0.2s ease;

  &:hover {
    background-color: #F3F3F3;
  }

  :global(.dark) & {
    color: #fff;

    &:hover {
      background-color: #313234;
    }
  }
}